<?php 
echo "查看局部链接数据库信息！！（单个链接显示）<br />";
try{
	$dsn = 'mysql:host=localhost; dbname=exercise';
	$username = 'root';
	$password = 'root';
	$pdo = new PDO($dsn, $username, $password);
	echo "自动提交值为：".$pdo->getAttribute(PDO::ATTR_AUTOCOMMIT);
	echo "<hr />";
	echo "PDO默认的错误处理方式为：".$pdo->getAttribute(PDO::ATTR_ERRMODE);
	$pdo->setAttribute(PDO::ATTR_AUTOCOMMIT, 0);
	echo "<hr />";
	echo "自动提交：".$pdo->getAttribute(PDO::ATTR_AUTOCOMMIT);

}catch(PDOException $e) {
	echo $e->getMessage();
}

 ?>